FROM --platform=$TARGETPLATFORM registry.cn-zhangjiakou.aliyuncs.com/publicx/debian:11.7

COPY --from=registry.cn-zhangjiakou.aliyuncs.com/publicx/oracle-jdk-archive:21.0.3 /jdk-21.0.3.tar.gz /

RUN tar -xzf /jdk-21.0.3.tar.gz

FROM --platform=$TARGETPLATFORM registry.cn-zhangjiakou.aliyuncs.com/publicx/debian:11.7

MAINTAINER xuelingkang

COPY --from=0 /jdk-21.0.3 /opt/jdk-21.0.3

RUN ln -sf /opt/jdk-21.0.3 /opt/jdk

ENV JAVA_VERSION=21.0.3
ENV JAVA_HOME=/opt/jdk
ENV PATH=$JAVA_HOME/bin:$PATH
ENV LANG C.UTF-8
ENV LANGUAGE C.UTF-8
